#ifndef CALCENGINE_H
#define CALCENGINE_H
#include "CalcInterface.h"
#include "CalcStack.h"
#include "OperatorStack.h"
#include <QString>

template class CalcStack<double>;

class CalcEngine: public CalcInterface
{
public:
    CalcEngine();
    ~CalcEngine();
    void get_expr(const QString & expr);
    QString & get_result();
private:
    void calculate();
    QChar get_expr(const QString & expr, QString & number);
    QString m_expr;
    QString m_result;
    CalcStack<double> * m_num_stack;
    OperatorStack * m_op_stack;
};


#endif // CALCENGINE_H
